<div id="formsuccess" style="display:none">{if isset($errors.status) && $errors.status == "success"}reloadMenu{/if}</div>
<form action="?module=backoffice&amp;action=block_EditTarget" method="post" class="nyroModal">
{t assignTo=title}Target a document{/t}
{include file="$MODULES_DIR/backoffice/templates/block/modal/ModalTitle.html" title=$title}
<div id="modalContent">	
	<input type="hidden" name="form[docId]" value="{$document->getUniqueId()}" />
	<input type="hidden" name="form[docLang]" value="{$document->getLang()}" />
	<input type="hidden" name="form[moduleName]" value="{$moduleName}" />
    <table class="listTable">        
	{if count($docTargets) > 0}
        <tr><th>{t}Assigned target(s){/t}</th></tr>
        <tr><td>
		{foreach from=$docTargets item=docTarget}
			{if $docTarget.type == "unique"}
			<input name="form[{$docTarget.name}]" type="checkbox" checked="checked" disabled="disabled" />{$docTarget.label}<br />
			{else}
			<input name="form[{$docTarget.name}]" type="checkbox" checked="checked" />{$docTarget.label}<br />
			<input type="hidden" name="form[check_{$docTarget.name}] value="1" />
			{/if}
		{/foreach}
        </td></tr>
	{/if}
	{if count($targets) > 0}
        <tr><th>{t}Available target(s){/t}</th></tr>
        <tr><td>
			{foreach from=$targets item=target}
				<input alt="{$target.label}" name="form[{$target.name}]" type="checkbox" />{$target.label}<br />
			{/foreach}
        </td></tr>
	{/if}            
    </table>
</div>{include file="$MODULES_DIR/backoffice/templates/block/modal/ModalFooter.html"}
</form>